package com.may.ipersistence.sqlSession;

import java.util.List;

/**
 * @program: lagou
 * @description:
 * @author: Bobby.Ma
 * @create: 2020-11-05 18:20
 **/
public interface SqlSession {

    /**
     * @param statementId sql 语句唯一标识
     * @param params      sql 语句参数
     * @Description: 查询所有
     * @return: java.util.List<T>
     * @Author: Bobby.Ma
     * @Date: 2020/11/5 18:28
     */
    <E> List<E> selectList(String statementId, Object... params);


    /**
     * @param statementId sql 语句唯一标识
     * @param params      sql 语句参数
     * @Description: 查询单个
     * @return: T
     * @Author: Bobby.Ma
     * @Date: 2020/11/5 18:33
     */
    <T> T selectOne(String statementId, Object... params);
}
